package com.zxjbyte.yiyi.framework.operatelog.config;

import com.zxjbyte.yiyi.framework.operatelog.aspect.OperateLogAspect;
import com.zxjbyte.yiyi.framework.operatelog.event.OperateLogListener;
import com.zxjbyte.yiyi.module.system.api.log.OperateLogApi;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;

/**
 * @Author zhangxingjia
 * @Date 2023/3/8 11:14
 * @Version: 1.0
 */
@AutoConfiguration
public class YiyiOperateLogAutoConfiguration {

    @Bean
    public OperateLogAspect operateLogAspect(){
        return new OperateLogAspect();
    }

    @Bean
    public OperateLogListener operateLogListener(OperateLogApi operateLogApi){
        return new OperateLogListener(operateLogApi);
    }
}
